const path = require('path')
const resolve = (dir) => path.join(__dirname, dir)
module.exports = {
    // publicPath: './',
    // 打包路径，使用相对路径生成的dist文件夹下的index可以打开
    outputDir: 'dist',
    // 输出文件目录
    productionSourceMap: false,
    // 取消生成map文件
    lintOnSave: false,
    // 配置关闭eslint  (代码会有红色热浪提示错 但不影响代码运行)
    parallel: false,
    // webpack-dev-server 相关配置
    chainWebpack: config => {
        config.resolve.alias
            .set('@', resolve('src'))
            .set('utils', resolve('src/utils'))
    },
    pluginOptions: {
        electronBuilder: {
            nodeIntegration: true,
            builderOptions: {
                nsis: {
                    allowToChangeInstallationDirectory: true, //自定义安装路径
                    oneClick: false,
                    shortcutName:'豫图网'
                },
                win: {
                    icon: "build/icons/icon.ico",
                    publish: [{
                        provider: "generic",
                        url: "https://www.hnytw.cn/pc/"  //更新包地址  
                    }],
                },
                productName: 'ytw'  //项目名
            }
        },
    }
}